package com.zhuiyun.pm.client.login.service;

import com.zhuiyun.pm.client.login.entity.ClientUser;
import com.zhuiyun.pm.config.CommonResult;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author syc
 * @date 2023/3/13 19:27
 */
public interface UserLoginService {
    /**
     * 查询手机是否有该用户
     * @param clientUser
     * @return
     */
    CommonResult queryByPhone(ClientUser clientUser);
    /**
    * @Author sgo
    * @Description  用户登录判断密码
    * @Date 2023/3/14 14:00
    * @Return com.zhuiyun.pm.config.CommonResult
    * @param clientUser
    */
    CommonResult loginByPassWord(ClientUser clientUser);
    /**
    * @Author sgo
    * @Description 发送验证码
    * @Date 2023/3/14 18:48
    * @Return com.zhuiyun.pm.config.CommonResult
    * @param phone
    */
    CommonResult sendloginByPhone(String phone);
    /**
    * @Author sgo
    * @Description 验证码登录
    * @Date 2023/3/14 19:48
    * @Return com.zhuiyun.pm.config.CommonResult
    * @param phone
    * @param code
    */
    CommonResult loginByPhone(String userEmail,String code);
    /**
    * @Author sgo
    * @Description 注册用户
    * @Date 2023/3/16 9:41
    * @Return com.zhuiyun.pm.config.CommonResult
    * @param clientUser
    */
    CommonResult register(ClientUser clientUser,String code);
    /**
     * @Author 赵笛
     * @Description TODO 根据token获取当前登录的用户
     * @Date 2023/3/19 18:55
     * @Return com.zhuiyun.pm.config.CommonResult
     * @param token
     */
    CommonResult getLoginUser(String token);

    CommonResult AppLogin(ClientUser clientUser);
    /**
    * @Author sgo
    * @Description 发送邮箱
    * @Date 2023/3/21 20:22
    * @Return com.zhuiyun.pm.config.CommonResult
    * @param userEmail
    */
    CommonResult sendMail(String userEmail,String type);



    /**
     * 用户修改信息回显
     * @author 温
     * @date 2023/3/21 15:14
     * @parameter [id]
     * @return com.zhuiyun.pm.client.login.entity.ClientUser
     */
    ClientUser clientUserId(int id);



    /**
     * 用户信息修改
     * @author 温
     * @date 2023/3/21 11:29
     * @parameter [file, aaa]
     * @return int
     */
    CommonResult clientUserUpdate(MultipartFile file, ClientUser clientUser,String token);

    CommonResult revisePassWord(ClientUser clientUser,String token);


    /**
     * 用户根据userName 实现模糊查
     * @author 温
     * @date 2023/4/4 16:23
     * @parameter [userName]
     * @return java.util.List<com.zhuiyun.pm.client.login.entity.ClientUser>
     */
    List<ClientUser> userMo(ClientUser clientUser);
}
